package com.jltx.xq.videoeditorlearnpro;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

import butterknife.ButterKnife;

/**
 * @author jltxseo
 *         Created by junlintianxia on 2018/03/02.
 * @version V1.0
 * @Description
 */

public abstract class BaseAppCompatActivity extends AppCompatActivity implements BaseAppCompatApp{

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //子类不再需要设置布局ID，也不再需要使用ButterKnife.bind()
        setContentView(provideContentViewId());
        ButterKnife.bind(this);
        initView(savedInstanceState);
    }

    @Override
    public void onExitFinish() {

    }

    /**
     * 得到当前界面的布局文件id(由子类实现)
     * @return
     */
    protected abstract int provideContentViewId();

    /**
     * 初始化
     * @param savedInstanceState
     */
    public void initView(Bundle savedInstanceState) {

    }
}
